package com.design.observer;

/**
 * @author cxx
 * @create 2020-04-21 14:05
 **/
public class AliPay extends Observer {

    private int payState;

    public AliPay(Subject subject) {
        this.subject = subject;
        subject.attach (this);
    }

    @Override
    public void update() {
        payState = subject.getState ();
        System.out.println ("Ali支付状态改为："+payState);
    }
}
